package de.koller.magnitude.entity.player;

import de.koller.magnitude.MNode;
import de.koller.oceanFramework.OceanException;
import java.util.HashMap;
import java.util.Map;

public class PlayerContainer extends MNode {
	
	public final Map<Integer, Player> players = new HashMap<>();
	
	public Player createPlayer( int id ) {
		if( players.containsKey( id ) )
			throw new OceanException( "Player with an id exists!" );
		
		Player p = new Player( id );
		players.put( id, p );
		return p;
	}
	
}
